#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""


@author:stone
@file:net.py
@time:2021/08/12
"""

import requests


class Net:

    def send(self, url, headers, method, data):
        global resp

        if str.upper(method) == "GET":
            resp = requests.get(url, headers=headers)
        elif str.upper(method) == "POST":
            resp = requests.post(url=url, data=data, headers=headers)

        return resp
